package com.bookmall.member.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * MVC视图配置
 * @Author 胡菜鸡
 * @Create 2022-04-02-15:12
 */
@Configuration
public class MemberWebConfig implements WebMvcConfigurer {

    /**
     * 视图映射（映射到登录和注册页面）
     * @author 胡菜鸡
     * @date 2022/4/2 15:12
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/login.html").setViewName("login");
        registry.addViewController("/register.html").setViewName("register");
    }
}
